<?php use_helper('PA_Links') ?>
<?php use_helper('PA_Core') ?>
<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <?php echo PACore::getStylesheets(array('name' => 'document.css', 'media' => 'screen, print')) ?>
    <?php echo PACore::getJavascripts() ?>
    <title><?php echo isset($title) ? $title : "Dokument" ?></title>
    <script type="text/javascript">
      $(document).ready(function(){
        var width = $("table").width() + 50;
        var height = $("body").height() + 70;
        window.resizeTo(width, height);
        });
    </script>
  </head>
  <body>
    <div class="cDocument">
      <?php if(!include_slot('documentError')): ?>
      <div class="cDate">
        Leźno, <?php echo date('d.m.Y'); ?>
      </div>
      <hr />
      <table id="content">
        <tr>
          <td id="header" colspan="4">
          <?php if(!include_slot('documentType')): ?>
            Bez nazwy
          <?php endif; ?>
          </td>
        </tr>
        <tr>
          <td id="title" width="150" nowrap="nowrap">Numer dokumentu</td>
          <td width="250">
          <?php if(!include_slot('documentTitle')): ?>
            Bez nazwy
          <?php endif; ?>
          </td>
          <td id="title" width="100" nowrap="nowrap">Numer arkusza</td>
          <td>
          <?php if(!include_slot('documentPages')): ?>
            1 / 1
          <?php endif; ?>
          </td>
        </tr>
        <tr>
          <td id="title">Uwagi</td>
          <td colspan="3">
          <?php if(!include_slot('documentAnnotation')): ?>
            -
          <?php endif; ?>
          </td>
        </tr>
        <tr>
          <td id="header" colspan="4">
            Wystawiający
          </td>
        </tr>
        <tr>
          <td id="title" width="150">Imię i nazwisko</td>
          <td nowrap="nowrap">
          <?php if(!include_slot('documentAuthorName')): ?>
            Brak autora
          <?php endif; ?>
          </td>
          <td id="title" width="100">E-mail</td>
          <td nowrap="nowrap">
          <?php if(!include_slot('documentAuthorEmail')): ?>
            Brak email
          <?php endif; ?>
          </td>
        </tr>
        <tr>
          <td id="title">Tel. kom.</td>
          <td nowrap="nowrap">
          <?php if(!include_slot('documentAuthorMobile')): ?>
            Brak tel. kom.
          <?php endif; ?>
          </td>
          <td id="title">Tel.</td>
          <td nowrap="nowrap">
          <?php if(!include_slot('documentAuthorNumber')): ?>
            Brak tel.
          <?php endif; ?>
          </td>
        </tr>
        <?php include_slot('documentExtraRows') ?>
      </table>
      <br />
      <table id="content">
        <?php include_slot('documentItemsRows') ?>
      </table>
      <div class="cTools">
        <input type="button" onclick="window.print()" value="Drukuj" />
        <input type="button" onclick="window.print();window.close()" value="Drukuj z zamknij" />
        <input type="button" onclick="" value="Eksport do PDF" />
        <input type="button" onclick="window.close()" value="Zamknij" />
      </div>
      <?php endif; ?>
    </div>
  </body>
</html>
